import BlankView from '@/layouts/BlankView';
import PageView from '@/layouts/PageView';

// 电商项目页面
export default {
  path: 'shop',
  name: '电商项目',
  meta: {
    icon: 'like',
  },
  component: BlankView,
  children: [
    {
      path: 'goods',
      name: '商品',
      meta: {
        icon: 'shop',
      },
      component: PageView,
      children: [
        {
          path: 'classify',
          name: '商品分类',
          meta: {
            icon: 'pie-chart',
          },
          component: () => import('@/pages/shop/goods/classify/classify'),
        },
        {
          path: 'sku',
          name: '商品规格',
          meta: {
            icon: 'pie-chart',
          },
          component: () => import('@/pages/shop/goods/sku/index'),
        },
        {
          path: 'goodsList',
          name: '商品列表',
          meta: {
            icon: 'unordered-list',
          },
          component: () => import('@/pages/shop/goods/list/goodList'),
        },
        {
          path: 'addGood',
          name: '添加商品',
          meta: {
            icon: 'plus-square',
          },
          component: () => import('@/pages/shop/goods/add/add'),
        },
      ],
    },
    {
      path: 'order',
      name: '订单',
      meta: {
        icon: 'bars',
        authority: {
          role: 'user',
        },
      },
      component: PageView,
      children: [
        {
          path: 'list',
          name: '订单列表',
          meta: {
            icon: 'menu',
          },
          component: () => import('@/pages/shop/order/orderList/orderList'),
        },
        {
          path: 'detail/:id',
          name: '订单详情',
          meta: {
            invisible: true,
          },
          component: () => import('@/pages/shop/order/orderDetail/orderDetail'),
        },
      ],
    },
    {
      path: 'carousel',
      name: '轮播图管理',
      meta: {
        icon: 'picture',
      },
      component: PageView,
      children: [
        {
          path: 'control',
          name: '轮播图',
          meta: {
            icon: 'project',
          },
          component: () => import('@/pages/shop/carousel/carousels/carousel'),
        },
        {
          path: 'controlgroup',
          name: '轮播图分组',
          meta: {
            icon: 'unordered-list',
          },
          component: () =>
            import('@/pages/shop/carousel/carouselgroup/carouselgroup'),
        },
      ],
    },
  ],
};
